package com.njcb.ams.orm.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.njcb.ams.orm.dao.base.BaseMyBatisDAO;
import com.njcb.ams.orm.dao.mapper.ProjectInfoMapper;
import com.njcb.ams.orm.entity.ProjectInfo;
import com.njcb.ams.orm.entity.ProjectInfoExample;

@Repository
public class ProjectInfoDAO extends BaseMyBatisDAO<ProjectInfo, ProjectInfoExample, Integer> {

	public ProjectInfoDAO() {
		this.entityClass = ProjectInfo.class;
	}

	@Autowired
	private ProjectInfoMapper mapper;

	@Override
	@SuppressWarnings("unchecked")
	public ProjectInfoMapper getMapper() {
		return mapper;
	}

	/**
	 * 
	 * 方法功能描述：根据需求编号查询需求信息
	 * 
	 * @param requireNo
	 * @return
	 */
	public ProjectInfo selectByRequireNo(String requireNo) {
		ProjectInfoExample example = new ProjectInfoExample();
		example.createCriteria().andRequireNoEqualTo(requireNo);
		return selectOneByExample(example);
	}

}
